package demo05;

/**
 * @author JYH
 * @version 1.0
 * @date 2022/11/1 15:37
 */
public class TestPriorityDemo {
    public static void main(String[] args) {
        PriorityDemo p1 = new PriorityDemo();
        PriorityDemo p2 = new PriorityDemo();

        p1.setPriority(10);
        p2.setPriority(1);
        p1.start();
        p2.start();
    }
}
class PriorityDemo extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName()+"==="+i);
        }
    }
}
